import React from 'react'
import { Button } from 'antd'

interface Props {
  state: boolean
  toggle: () => void
  gotothree: () => void
}

const Index: React.FC<Props> = props => {
  const { state, toggle, gotothree } = props

  return (
    <header>
      <Button onClick={toggle} type={state ? 'primary' : undefined}>
        切换主题
      </Button>
      <Button onClick={gotothree} color="primary" variant="link">
        进入3D展览馆
      </Button>
    </header>
  )
}

export default Index
